//
//  LoopComposeButton.swift
//  LoopWeibo
//
//  Created by loop安 on 2016/12/15.
//  Copyright © 2016年 loop. All rights reserved.
//

import UIKit

class LoopComposeButton: UIButton {

    override init(frame: CGRect) {
        super.init(frame: frame)
        titleLabel?.textAlignment = .center
        titleLabel?.font = UIFont.systemFont(ofSize: 16)
        setTitleColor(#colorLiteral(red: 0.501960814, green: 0.501960814, blue: 0.501960814, alpha: 1), for: .normal)
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
        return CGRect(x: 0, y: 0, width: composeBtnWidth, height: composeBtnWidth)
    }
    
    override func titleRect(forContentRect contentRect: CGRect) -> CGRect {
        return CGRect(x: 0, y: composeBtnWidth, width: composeBtnWidth, height: composeBtnHeight - composeBtnWidth)
    }

}
